<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
<title>匹配字符\b的使用</title>
</head>
<body>
<h3>字符\b的使用</h3>
<script type="text/javascript">
<!--
    var reg_expression = /\bming\b/;
    var textString="ming ri soft";
    var result=reg_expression.test(textString);  //匹配时返回true,否则false
    document.write("<font size='+1'>"+result+"<br>");
    if(result){
        document.write("正则表达式 /\\bming\\b/匹配字符串\""+ textString +"\".<br>");
    }
    else{
        alert("未找到匹配的模式!");
    }
// -->
</script>
</body>
</html>

